<?php
	require_once('inc/Database.inc');
 	$link = ConnectToDatabase2();
 
	if( $_POST['NotFirstTime'] == 'True')
	{

		$date       = date('Y-m-d\ H:i:s');
	 	$contact    = mysql_real_escape_string ($_POST['contact'], $link);
	 	$description= mysql_real_escape_string ($_POST['description'], $link);
	 	$handled    = 0;
	 	
	 	$sql = "INSERT INTO requests (date,contact,description,handled) VALUES ('$date','$contact','$description',$handled);";
	 	if (RunSql($sql,$link))
	 	{
	 		echo 'Thank you! We have received your request.'';
	 	}
	}
	else
	{
	}
?>

	<h3>Call on C.U.R.E.</h3>

	<Ul>
    	<li \>To request disaster relief assistance
    	<li \>To obtain medical supplies or equipment for medical mission efforts
    	<li \>To make donations of funds or materials
    	<li \>To identify potential sources of free or low-cost medical or household supplies
	</Ul>
	
	<h3>Make a Request</h3>

	<Form method="Post">
		<input type="hidden" name="NotFirstTime" value="True" />
		<table>
			<tr>
				<td valign="top" align="right" width="150">How can we contact you?</td>
				<td><textarea rows="5" cols="50" name="contact"></textarea></td>
			</tr>
			<tr>
				<td valign="top" align="right" width="150">How can we help?</td>
				<td><textarea rows="10" cols="50" name="description"></textarea>
			</tr>
			<tr>
				<td colspan="2" align="right"><input type="submit" value="Submit" /></td>
			</tr>
		</table>
	</Form>